<template>
	<div class="">
	
		<pageTitle :title="data.pageTitle" v-if="data.pageTitle != ''"></pageTitle>
		
		<filters 
			v-if="data.filterOption" 
			:options="data.filterOption"
			@change="search"
			></filters>
			
		<listTable
			ref="listTable"
			v-if="data.listOption" 
			:options="data.listOption"
			@command="listCommand"
			></listTable>
		
	</div>
</template>

<script>
	import pageTitle from "@/view/layout/components/content/pageTitle";
	
	import filters from "@/view/components/listFilters"
	import listTable from "@/view/components/table/listTable"
	
	export default {
		props : [
			"data",
		],
		components : {
			pageTitle,
			filters,
			listTable,
		},
		data(){
			return {
				
			}
		},
		mounted(){
			// this.search();
			// this.$refs.listTable.initPage()
		},
		methods : {
			refresh(){
				this.search();
			},
			search(params){
				if(this.$refs.listTable){
					if(params){
						this.$refs.listTable.initPage()
					}
					this.$refs.listTable.search(params)
				}
				this.$emit('handleSearchLog',params)
			},
			loadTableData(tableData){
				this.$refs.listTable.serviceCallBack({
					data :tableData,
				},true)
			},
			listCommand(command,row,index){
				this.$emit("onCommand", command,row,index )
			}
		}
	}
</script>

<style>
</style>